﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hiro.Containers;
using Mono.Cecil;

namespace Hiro.Interfaces
{
    /// <summary>
    /// Represents a type that can define the method implementations for the <see cref="IMicroContainer"/> interface.
    /// </summary>
    public interface IContainerBuilder
    {
        /// <summary>
        /// Emits the <see cref="IMicroContainer.GetAllInstances"/> method
        /// </summary>
        /// <param name="containerType">The container type that will implement the <see cref="IMicroContainer"/> interface.</param>
        /// <param name="mainModule">The module that hosts the container.</param>
        /// <param name="dependencyMap">The <see cref="IDependencyMap"/> that describes the dependencies in the current application.</param>
        void EmitGetAllInstances(TypeDefinition containerType, ModuleDefinition mainModule, IDependencyMap dependencyMap);

        /// <summary>
        /// Emits the <see cref="IMicroContainer.GetInstance"/> method.
        /// </summary>
        /// <param name="containerType">The container type that will implement the <see cref="IMicroContainer"/> interface.</param>
        /// <param name="mainModule">The module that hosts the container.</param>
        /// <param name="dependencyMap">The <see cref="IDependencyMap"/> that describes the dependencies in the current application.</param>
        void EmitGetInstance(TypeDefinition containerType, ModuleDefinition mainModule, IDependencyMap dependencyMap);
    }
}
